package com.beone.smart.smartBeauty.exception;

import com.beone.smart.smartBeauty.model.result.ResultTool;

/**
 * @author yangjie
 */
public class GlobalException extends RuntimeException {
    private ResultTool.HttpResponseCode code;
    private String message;

    public GlobalException() {
        super();
    }

    public GlobalException(String message) {
        super(message);
        this.message = message;
    }

    public GlobalException(ResultTool.HttpResponseCode code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public ResultTool.HttpResponseCode getCode() {
        return code;
    }

    public void setCode(ResultTool.HttpResponseCode code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
